<template>
  <div>
    <h1>App</h1>
    <p>count:{{ count }}</p>
    <button @click="increment">累加count</button>
    <button @click="incrementN({ n: 5 })">累加N count</button>
    <button @click="decrement">累减count</button>
    <button @click="incrementWait">等一等累加count</button>
  </div>
</template>

<script>
import { mapState, mapMutations } from "vuex";
/* import store from "./stores";
console.log(store); */
export default {
  name: "App",
  mounted() {
    console.log(this, "app");
    /* const result = mapMutations(["increment", "decrement", "incrementN"]);
    console.log(result, "result");
    result.increment.call(this); */
  },
  computed: {
    ...mapState(["count", "num"]),
    //.....
  },
  methods: {
    ...mapMutations(["increment", "decrement", "incrementN", "incrementWait"]),
  },
};
</script>

<style></style>
